//
//  RVVIPCenterController.swift
//  AirTravel
//
//  Created by apple on 2021/11/11.
//

import UIKit

class RVVIPCenterController: CommonVC{

    
    @IBOutlet weak var bgView: UIView!

    @IBOutlet weak var coverView: UIView!
    
    @IBOutlet weak var detailBtn: UIButton!
    
    @IBOutlet weak var patBtn: UIButton!
        
    @IBOutlet weak var tableView: UITableView!

    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor(hexString: "#394668")
        head.title.text = "会员中心"
        confUI()
    }

    
    func confUI(){
        bgView.setCorner(radius: 16.5)
        patBtn.setCorner(radius: 11)
        patBtn.layer.borderWidth = 1
        patBtn.layer.borderColor = UIColor(hexString: "#645435").cgColor
        tableView.allowsSelection = false
        tableView.rowHeight = 520
        tableView.separatorStyle = .none
        tableView.backgroundColor = UIColor(hexString: "#394668")

        tableView.register(UINib(nibName: "RVVipListCell", bundle: nil), forCellReuseIdentifier: "vip_list")
    }

    @IBAction func clickPayBtn(_ sender: Any) {
        navigationController?.pushViewController(RVCheckstandController(), animated: true)
    }
    
    @IBAction func clickDetailBtn(_ sender: UIButton) {
        navigationController?.pushViewController(RVRuleViewController(), animated: true)
    }
}

extension RVVIPCenterController: UITableViewDelegate, UITableViewDataSource{
    
    func numberOfSections(in tableView: UITableView) -> Int {
        1
    }
    
    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        1
    }
    
    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
        let cell = tableView.dequeueReusableCell(withIdentifier: "vip_list", for: indexPath) as! RVVipListCell
        return cell
    }
    
}
